//
//  ReaderCell.swift
//  GhostWorld
//
//  Created by Kam on 2018/4/6.
//  Copyright © 2018 LKGood. All rights reserved.
//

import UIKit
import SnapKit

class ReaderCell: UICollectionViewCell {
  
  // MARK: - IBOutlets
  
  
  
  // MARK: - Private vars
  
  private let personView: PersonView = .fromNib()
  
  // MARK: - Private methods
  
  
  
  // MARK: - Public vars
  
  
  
  // MARK: - Lifecycle
  
  override func awakeFromNib() {
    super.awakeFromNib()
    backgroundColor = .clear
    
    addSubview(personView)
    personView.snp.makeConstraints { maker in
      maker.width.equalTo(PersonView.defaultWidth)
      maker.height.equalTo(PersonView.defaultHeight)
      maker.center.equalTo(self)
    }
  }
  
  // MARK: - IBActions
  
  
  
  // MARK: - Public methods
  
  func prepare(reader: Reader) {
    personView.prepare(person: reader)
  }
}
